import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path:'/login',
        component: () => import('@/views/MioLogin.vue')
    },
    {
        path:'/control',
        component: () => import('@/views/MioControl.vue'),
        children: [
            {path: '', redirect: '/control/home'},
            {path: 'home', component: () => import('@/views/MioHome.vue')},
            {path: 'admin', component: () => import('@/views/MioAdmin.vue')},
        ]
    },
  
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router